package com.example.tests;

public class ContactObject {
	public String firstName;
	public String lastName;
	public String addressFirst;
	public String homePhone;
	public String mobilePhone;
	public String workPhone;
	public String emailFirst;
	public String emailSecond;
	public String birthYear;
	public String addressSecond;
	public String phoneSecond;
	public String birthDate;
	public String birthMonth;
	public String id;

	public ContactObject setFirstName(String firstName) {
		this.firstName = firstName;
		return this;
	}

	public ContactObject setLastName(String lastName) {
		this.lastName = lastName;
		return this;
	}

	public ContactObject setAddressFirst(String addressFirst) {
		this.addressFirst = addressFirst;
		return this;
	}

	public ContactObject setHomePhone(String homePhone) {
		this.homePhone = homePhone;
		return this;
	}

	public ContactObject setMobilePhone(String mobilePhone) {
		this.mobilePhone = mobilePhone;
		return this;
	}

	public ContactObject setWorkPhone(String workPhone) {
		this.workPhone = workPhone;
		return this;
	}

	public ContactObject setEmailFirst(String emailFirst) {
		this.emailFirst = emailFirst;
		return this;
	}

	public ContactObject setEmailSecond(String emailSecond) {
		this.emailSecond = emailSecond;
		return this;
	}

	public ContactObject setBirthYear(String birthYear) {
		this.birthYear = birthYear;
		return this;
	}

	public ContactObject setAddressSecond(String addressSecond) {
		this.addressSecond = addressSecond;
		return this;
	}

	public ContactObject setPhoneSecond(String phoneSecond) {
		this.phoneSecond = phoneSecond;
		return this;
	}

	public ContactObject setBirthDate(String birthDate) {
		this.birthDate = birthDate;
		return this;
	}

	public ContactObject setBirthMonth(String birthMonth) {
		this.birthMonth = birthMonth;
		return this;
	}

	public ContactObject setId(String id) {
		this.id = id;
		return this;
	}
	
	

	@Override
	public String toString() {
		return "Contact [" + id + ": " + firstName + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((firstName == null) ? 0 : firstName.hashCode());
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		ContactObject other = (ContactObject) obj;
		if (firstName == null) {
			if (other.firstName != null)
				return false;
		} else if (!firstName.equals(other.firstName))
			return false;
		if (id != null && other.id != null) {
			return id.equals(other.id);
		}
		return true;
	}

	
}